package com.dingreading.cloud.common.util;

/**
 * 合作类型 50叮叮书房 40佳音 30绘本 20悦读吧
 */
public enum EnumCooperationType {
    DING_DING(50, "叮叮书房"),
    JIA_YIN(40, "佳音"),
    HUI_BEN(30, "绘本"),
    YUE_DU(20, "悦读吧"),
    ;

    private final int type;
    private final String name;

    public int getType() {
        return type;
    }

    public String getName() {
        return name;
    }

    //构造方法
    EnumCooperationType(int type, String name) {
        this.type = type;
        this.name = name;
    }

    public static String getTypeName(int type) {
        for (EnumCooperationType data : EnumCooperationType.values()) {
            if (data.getType() == type) {
                return data.getName();
            }
        }
        return "";
    }

}
